package com.android.goal;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.BaseAdapter;
import android.widget.GridView;
import android.widget.ImageView;

public class AllLeaguesActivity extends Activity {
	@Override
	public void onCreate(Bundle savedInstanceState){
		
		super.onCreate(savedInstanceState);
		gridDemo();
	}
	
	public void gridDemo()
    {
		final Intent i =  new Intent(this, League.class);
    	setContentView(R.layout.allleague);
    	
    	GridView gridview = (GridView) findViewById(R.id.gridview);
        
        gridview.setAdapter(new ImageAdapter(this));
        
        gridview.setOnItemClickListener(new OnItemClickListener() 
        {
        	public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
        		
                Intent i = new Intent();
                i.setClass(AllLeaguesActivity.this, LiveScoreActivity.class);
                startActivity(i);
            }

        });
    }

}